package fr.umlv.m2.jee.portailEtudiant.persistence.DAO;

import fr.umlv.m2.jee.portailEtudiant.framework.dao.hibernate.AbstractHibernateDAO;
import fr.umlv.m2.jee.portailEtudiant.persistence.ICourseDocumentDAO;
import fr.umlv.m2.jee.portailEtudiant.persistence.CourseDocument;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: soufiane
 * Date: 18/04/11
 * Time: 11:18
 * To change this template use File | Settings | File Templates.
 */
@Repository("hibernateCourseDocumentDAO")
class HibernateCourseDocumentDAO extends AbstractHibernateDAO<Long, CourseDocument> implements ICourseDocumentDAO {

    @Override
    public List<CourseDocument> findByCourseDocumentId(long id) {
        return super.findByQuery("FROM CourseDocument WHERE COURSEDOCUMENT_id ='" + id + "'");
    }
}
